import Scene3d from "./src/3d/scene/Scene3d.js";

let scene3d

function initScene3d() {
  scene3d = new Scene3d()
  scene3d.init(document.getElementById('playground'))
  scene3d.loadFromLocal();
  scene3d.startRender();
}

initScene3d()
const box3d = document.getElementById('box');
box3d.addEventListener('pointerdown', (event) => {
  scene3d.pointerDown(event);
});

box3d.addEventListener('pointermove', (event) => {
  scene3d.pointerMove(event);
});

box3d.addEventListener('pointerup', (event) => {
  scene3d.pointerUp(event);
});

box3d.addEventListener('contextmenu', contextmenu);

function contextmenu( event ) {
  event.preventDefault();
}
